package com.example.feign.clients;

import com.example.feign.bo.Person01BO;
import com.example.feign.config.FeignConfig;
import com.example.feign.config.UserClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(value = "userservice",configuration = FeignConfig.class,fallbackFactory = UserClientFallbackFactory.class)
public interface UserClientFeignApi {
    @RequestMapping(value = "/user/select/{id}",method = RequestMethod.GET)
    public List<Person01BO> select(@PathVariable("id") String id);

    @RequestMapping(value = "/hystrix/test",method = RequestMethod.GET)
    public String testHystrix();

    @RequestMapping(value = "/sentinel/test",method = RequestMethod.GET)
    public String testSentinel();
}
